<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@page import="com.demoweb.model.dto.Membership"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Red Fortress</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="/demoweb/styles/style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<%
	pageContext.include("/WEB-INF/views/include/fortressheader.jsp");
%>

<div id="content">
  <div id="sidebar">
    <div id="login" class="boxed">
      <h2 class="title">Client Account</h2>
      <div class="content">     

		<%
     			if(session.getAttribute("loginuser") == null)  {
     		%>
		  <form id="loginform" method="post" action="fortressLogin.nhn">  
          	<fieldset>
          	<legend>Login</legend>
          	<label for="inputtext1">Client ID:</label>
          	<input id="inputtext1" type="text" name="memberId" value="" />
          	<label for="inputtext2">Password:</label>
          	<input id="inputtext2" type="password" name="passwd" value="" />
          	<input id="inputsubmit1" type="submit" name="inputsubmit1" value="Login" />
          	<p><a href="">Forgot your password?</a></p>
          	</fieldset>
         </form>
	 	<%
	 		} else {
	 	%>	 
	 	 <form id="loginform" method="post" action="fortressLogin.nhn">  
         	 <fieldset>
          	 <legend>Login</legend>
          	 <%
          	 	Membership member = (Membership)session.getAttribute("loginuser");
          	 %>
			 <a2> <%=member.getMemberId()%> 님 환영합니다. </a2>
			 <a href="/demoweb/fortress/fortressLogout.nhn"> 로그아웃</a></br>
		 	 <input type="button" value="Start" style="width:200px" style="hegiht:50px" onclick="location.href='.action';" />
			 <%
			 	}
			 %>      
          	 </fieldset>
		</form>
		
      </div>
    </div>
   
   <%
      	pageContext.include("/WEB-INF/views/include/fortressrecentupdates.jsp");
      %>
       
  </div>
  
  <!-- ---------------------------------- Main page content ----------------------------------- -->
  <div id="main"> 
  	  <h2 class="title">Board Write</h2>
	<link rel="Stylesheet" href="/demoweb/styles/input.css" />	
     
	<div id="pageContainer">
		<div style="padding-top:25px;text-align:center">
		<div id="inputcontent">
		    <div id="inputmain">
		        <div class="inputsubtitle">게시판 글 쓰기</div>
		        <form id="boardwriteform" action="fortressboardwrite.nhn" method="post">
		        <table>
		            <tr>
		                <th>제목</th>
		                <td>
		                    <input type="text" name="title" style="width:280px" />
		                </td>
		            </tr>
		            <tr>
		                <th>작성자</th>
		                <td>
		                	<%=((Membership)session.getAttribute("loginuser")).getMemberId()%>
		                </td>
		            </tr>
		            <tr>
		                <th>내용</th>
		                <td>		                    
		                    <textarea 
		                    	name="content" cols="76" rows="15"></textarea>
		                </td>
		            </tr>
		        </table>
		        <div class="buttons">
		        	<!-- 아래 a 링크는 input type='submit' 버튼을 누르는 효과 발생 -->		        	
		        	<a href="javascript:document.getElementById('boardwriteform').submit();">글쓰기</a>
		        	&nbsp;&nbsp;
		        	<a href="/demoweb/fortress/fortressBoardlist.nhn">목록보기</a>
		        </div>
		        </form>
		    </div>
		</div>   	
	  </div>
	 </div>	
	
	</div>
	</div>
     
  </div>
  <!-- -------------------------------------------------------------------------------------------- -->
  
</div>
<div id="footer">
  <p id="legal">Copyright &copy; 2007 Red Avenue. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
  <p id="links"><a href="http://www.free-css.com/">Home</a> | <a href="http://www.free-css.com/">Terms of Use</a></p>
</div>
</body>
</html>
